import Vue from 'vue'
import App from './App.vue'
import router from "./Router"
import store from './store'
import TypeNav from './components/TypeNav'
import Pagination from '@/components/Pagination'
import Dialog from '@/components/Dialog'
import '@/mockServer'
import 'swiper/css/swiper.min.css'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
Vue.use(ElementUI);
Vue.config.productionTip = false
import VueLazyload from 'vue-lazyload'
import load from '@/assets/aa.gif'
Vue.use(VueLazyload, {
  loading:load
})
// 注册为全局组件
Vue.component(TypeNav.name, TypeNav)
Vue.component(Dialog.name, Dialog)
// 将分页器注册为全局组件
Vue.component(Pagination.name, Pagination)
new Vue({
  render: h => h(App),
  router,
  //添加全局事件总线
  beforeCreate() {
    Vue.prototype.$bus = this
  },
  store
}).$mount('#app')
